package com.atguigu.pratice;

import java.util.Scanner;

public class TheNumOfBinary {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int res=0;
        while(n!=0){
            res++;
            n=n&(n-1);
        }
        System.out.println(res);
    }
}
